<script>

  function asdasd() {
    var chart = new CanvasJS.Chart("chartContainer",
        {
          title: {
            text: "六日气象数据"
          },
          axisY: {
            valueFormatString: "0℃",
            maximum: 45,
            minimum: 20,
            interval: 5,
            interlacedColor: "WhiteSmoke",
            gridColor: "LightGray",
            tickColor: "Silver"
          },
          theme: "theme2",
          legend: {
            verticalAlign: "bottom",
            horizontalAlign: "center",
            fontSize: 16
          },
          data: [
            {
              type: "line",
              lineThickness: 3,
              showInLegend: true,
              name: "低温",
              indexLabel: "{y}℃",
              dataPoints: [
                { label: "今天", y: 26 },
                { label: "明天", y: 28 },
                { label: "周四", y: 32 },
                { label: "周五", y: 27 },
                { label: "周六", y: 29 },
                { label: "周日", y: 28 }
              ]
            },
            {
              type: "line",
              lineThickness: 3,
              showInLegend: true,
              name: "高温",
              indexLabel: "{y}℃",
              dataPoints: [
                { label: "今天", y: 40 },
                { label: "明天", y: 40 },
                { label: "周四", y: 41 },
                { label: "周五", y: 40 },
                { label: "周六", y: 39 },
                { label: "周日", y: 38 }
              ]
            }
          ]
        });

    chart.render();
  }
</script>
<div id="chartContainer" style="height: 100%; width: 100%;">
</div>

<a href="javascript:void(0);" onclick="asdasd();">asasdasdasdasd</a>